

<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
    <style>
    /* base */
    html,
    body,
    .container {
      width: 100%;
      height: 100%;
    }

    a,
    a:link,
    a:visited {
      text-decoration: none;
      color: inherit;
    }

    ul {
      list-style: none;
    }

    *,
    ::before,
    ::after {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }

    *:focus {
      outline: 0;
    }

    .container {
      display: flex;
      padding-top: 20px;
    }

    /* Nav */
    .container .doc-nav {
      position: fixed;
      height: 100%;
      margin: 0 30px 0 40px;
      width: 280px;
    }

    .doc-nav .nav-header {
      display: flex;
      align-items: center;
      box-sizing: border-box;
      background-color: rgb(240, 241, 242);
      height: 40px;
      padding: 16px;
      font-size: 18px;
      font-weight: 500;
      color: rgb(62, 64, 66);
      cursor: pointer;
    }

    .doc-nav .nav-content {
      height: calc(100% - 40px);
      overflow-y: auto;
      color: rgb(32, 34, 36);
    }

    .doc-nav .nav-content .nav-list,
    .doc-nav .nav-content .nav-sub-list {
      line-height: 1.5rem;
    }

    .doc-nav .nav-content .nav-label {
      display: inline-block;
      position: relative;
      padding: 2px 0 2px 20px;
      margin-bottom: 4px;
    }

    .doc-nav .nav-content .nav-sub-label {
      position: relative;
      padding: 2px 0 2px 40px;
      font-size: 14px;
    }

    .doc-nav .nav-content .nav-sub-label:hover {
      text-decoration: underline;
    }

    .doc-nav .nav-content .nav-list .nav-label.group::before {
      border-bottom: 0.25rem solid transparent;
      border-left: 0.25rem solid #6e7072;
      border-right: 0;
      border-top: 0.25rem solid transparent;
      content: '';
      display: block;
      height: 0;
      left: 0.5rem;
      position: absolute;
      top: 0.625rem;
      transition: transform 0.1s linear;
      width: 0;
    }

    .doc-nav .nav-content .nav-list .nav-label.group.active::before {
      transform: rotate(90deg);
    }

    /* doc content */
    .container .doc-content {
      position: fixed;
      height: 100%;
      width: calc(100% - 80px - 40px - 30px - 240px);
      right: 0%;
      overflow-y: auto;
    }

    .doc-title {
      border-bottom: 1px solid #dcdee0;
      font-size: 22px;
      margin: 8px 0 0;
      padding-bottom: 16px;
    }

    .doc-content h3 {
      font-size: 24px;
      font-weight: 600;
      margin: 24px 0;
    }

    .doc-content h4 {
      font-size: 22px;
      font-weight: 500;
      margin: 30px 0 8px;
    }

    .doc-content h4 span {
      color: #007d9c;
    }

    .doc-content .doc-declare {
      background-color: #fafafa;
      border-radius: 5px;
      border: 1px solid #ccc;
      font-size: 14px;
      overflow-x: auto;
      padding: 10px;
      tab-size: 4;
      line-height: 20px;
    }

    .doc-content .doc-comment {
      font-size: 16px;
      margin: 16px 0;
      line-height: 24px;
      word-break: break-word;
    }
  </style>

</head>
<body>
  <div class="container">
    <div class="doc-nav">
      <a href="#Documentation" class="nav-header">Documentation</a>
      <nav class="nav-content">
        <ul class="nav-list">
          <li>
            <a href="#includes" class="nav-label">Includes</a>
             
            <ul class="nav-sub-list">

              <li>
                <a href="#config.h" class="nav-sub-label">config.h</a>
              </li>
      

              <li>
                <a href="#MBEDTLS_CONFIG_FILE" class="nav-sub-label">MBEDTLS_CONFIG_FILE</a>
              </li>
      

              <li>
                <a href="#stddef.h" class="nav-sub-label">stddef.h</a>
              </li>
      

              <li>
                <a href="#bignum.h" class="nav-sub-label">bignum.h</a>
              </li>
      
            </ul>
            
          </li>
          <li>
            <a href="#macros" class="nav-label">Macros</a>
             
            <ul class="nav-sub-list">

              <li>
                <a href="#MBEDTLS_ASN1_H" class="nav-sub-label">MBEDTLS_ASN1_H</a>
              </li>
      

              <li>
                <a href="#MBEDTLS_ERR_ASN1_OUT_OF_DATA" class="nav-sub-label">MBEDTLS_ERR_ASN1_OUT_OF_DATA</a>
              </li>
      

              <li>
                <a href="#MBEDTLS_ERR_ASN1_UNEXPECTED_TAG" class="nav-sub-label">MBEDTLS_ERR_ASN1_UNEXPECTED_TAG</a>
              </li>
      

              <li>
                <a href="#MBEDTLS_ERR_ASN1_INVALID_LENGTH" class="nav-sub-label">MBEDTLS_ERR_ASN1_INVALID_LENGTH</a>
              </li>
      

              <li>
                <a href="#MBEDTLS_ERR_ASN1_LENGTH_MISMATCH" class="nav-sub-label">MBEDTLS_ERR_ASN1_LENGTH_MISMATCH</a>
              </li>
      

              <li>
                <a href="#MBEDTLS_ERR_ASN1_INVALID_DATA" class="nav-sub-label">MBEDTLS_ERR_ASN1_INVALID_DATA</a>
              </li>
      

              <li>
                <a href="#MBEDTLS_ERR_ASN1_ALLOC_FAILED" class="nav-sub-label">MBEDTLS_ERR_ASN1_ALLOC_FAILED</a>
              </li>
      

              <li>
                <a href="#MBEDTLS_ERR_ASN1_BUF_TOO_SMALL" class="nav-sub-label">MBEDTLS_ERR_ASN1_BUF_TOO_SMALL</a>
              </li>
      

              <li>
                <a href="#MBEDTLS_ASN1_BOOLEAN" class="nav-sub-label">MBEDTLS_ASN1_BOOLEAN</a>
              </li>
      

              <li>
                <a href="#MBEDTLS_ASN1_INTEGER" class="nav-sub-label">MBEDTLS_ASN1_INTEGER</a>
              </li>
      

              <li>
                <a href="#MBEDTLS_ASN1_BIT_STRING" class="nav-sub-label">MBEDTLS_ASN1_BIT_STRING</a>
              </li>
      

              <li>
                <a href="#MBEDTLS_ASN1_OCTET_STRING" class="nav-sub-label">MBEDTLS_ASN1_OCTET_STRING</a>
              </li>
      

              <li>
                <a href="#MBEDTLS_ASN1_NULL" class="nav-sub-label">MBEDTLS_ASN1_NULL</a>
              </li>
      

              <li>
                <a href="#MBEDTLS_ASN1_OID" class="nav-sub-label">MBEDTLS_ASN1_OID</a>
              </li>
      

              <li>
                <a href="#MBEDTLS_ASN1_UTF8_STRING" class="nav-sub-label">MBEDTLS_ASN1_UTF8_STRING</a>
              </li>
      

              <li>
                <a href="#MBEDTLS_ASN1_SEQUENCE" class="nav-sub-label">MBEDTLS_ASN1_SEQUENCE</a>
              </li>
      

              <li>
                <a href="#MBEDTLS_ASN1_SET" class="nav-sub-label">MBEDTLS_ASN1_SET</a>
              </li>
      

              <li>
                <a href="#MBEDTLS_ASN1_PRINTABLE_STRING" class="nav-sub-label">MBEDTLS_ASN1_PRINTABLE_STRING</a>
              </li>
      

              <li>
                <a href="#MBEDTLS_ASN1_T61_STRING" class="nav-sub-label">MBEDTLS_ASN1_T61_STRING</a>
              </li>
      

              <li>
                <a href="#MBEDTLS_ASN1_IA5_STRING" class="nav-sub-label">MBEDTLS_ASN1_IA5_STRING</a>
              </li>
      

              <li>
                <a href="#MBEDTLS_ASN1_UTC_TIME" class="nav-sub-label">MBEDTLS_ASN1_UTC_TIME</a>
              </li>
      

              <li>
                <a href="#MBEDTLS_ASN1_GENERALIZED_TIME" class="nav-sub-label">MBEDTLS_ASN1_GENERALIZED_TIME</a>
              </li>
      

              <li>
                <a href="#MBEDTLS_ASN1_UNIVERSAL_STRING" class="nav-sub-label">MBEDTLS_ASN1_UNIVERSAL_STRING</a>
              </li>
      

              <li>
                <a href="#MBEDTLS_ASN1_BMP_STRING" class="nav-sub-label">MBEDTLS_ASN1_BMP_STRING</a>
              </li>
      

              <li>
                <a href="#MBEDTLS_ASN1_PRIMITIVE" class="nav-sub-label">MBEDTLS_ASN1_PRIMITIVE</a>
              </li>
      

              <li>
                <a href="#MBEDTLS_ASN1_CONSTRUCTED" class="nav-sub-label">MBEDTLS_ASN1_CONSTRUCTED</a>
              </li>
      

              <li>
                <a href="#MBEDTLS_ASN1_CONTEXT_SPECIFIC" class="nav-sub-label">MBEDTLS_ASN1_CONTEXT_SPECIFIC</a>
              </li>
      

              <li>
                <a href="#MBEDTLS_ASN1_TAG_CLASS_MASK" class="nav-sub-label">MBEDTLS_ASN1_TAG_CLASS_MASK</a>
              </li>
      

              <li>
                <a href="#MBEDTLS_ASN1_TAG_PC_MASK" class="nav-sub-label">MBEDTLS_ASN1_TAG_PC_MASK</a>
              </li>
      

              <li>
                <a href="#MBEDTLS_ASN1_TAG_VALUE_MASK" class="nav-sub-label">MBEDTLS_ASN1_TAG_VALUE_MASK</a>
              </li>
      

              <li>
                <a href="#MBEDTLS_OID_SIZE(x)" class="nav-sub-label">MBEDTLS_OID_SIZE(x)</a>
              </li>
      

              <li>
                <a href="#MBEDTLS_OID_CMP(oid_str, oid_buf)" class="nav-sub-label">MBEDTLS_OID_CMP(oid_str, oid_buf)</a>
              </li>
      
            </ul>
            
          </li>
          <li>
            <a href="#functions" class="nav-label">Functions</a>
             
            <ul class="nav-sub-list">

              <li>
                <a href="#mbedtls_asn1_get_len" class="nav-sub-label">mbedtls_asn1_get_len</a>
              </li>
      

              <li>
                <a href="#mbedtls_asn1_get_tag" class="nav-sub-label">mbedtls_asn1_get_tag</a>
              </li>
      

              <li>
                <a href="#mbedtls_asn1_get_bool" class="nav-sub-label">mbedtls_asn1_get_bool</a>
              </li>
      

              <li>
                <a href="#mbedtls_asn1_get_int" class="nav-sub-label">mbedtls_asn1_get_int</a>
              </li>
      

              <li>
                <a href="#mbedtls_asn1_get_bitstring" class="nav-sub-label">mbedtls_asn1_get_bitstring</a>
              </li>
      

              <li>
                <a href="#mbedtls_asn1_get_bitstring_null" class="nav-sub-label">mbedtls_asn1_get_bitstring_null</a>
              </li>
      

              <li>
                <a href="#mbedtls_asn1_get_sequence_of" class="nav-sub-label">mbedtls_asn1_get_sequence_of</a>
              </li>
      

              <li>
                <a href="#mbedtls_asn1_get_mpi" class="nav-sub-label">mbedtls_asn1_get_mpi</a>
              </li>
      

              <li>
                <a href="#mbedtls_asn1_get_alg" class="nav-sub-label">mbedtls_asn1_get_alg</a>
              </li>
      

              <li>
                <a href="#mbedtls_asn1_get_alg_null" class="nav-sub-label">mbedtls_asn1_get_alg_null</a>
              </li>
      

              <li>
                <a href="#mbedtls_asn1_free_named_data" class="nav-sub-label">mbedtls_asn1_free_named_data</a>
              </li>
      

              <li>
                <a href="#mbedtls_asn1_free_named_data_list" class="nav-sub-label">mbedtls_asn1_free_named_data_list</a>
              </li>
      
            </ul>
            
          </li>
          <li>
            <a href="#vars" class="nav-label">Vars</a>
             
            <ul class="nav-sub-list">

              <li>
                <a href="#mbedtls_asn1_named_data" class="nav-sub-label">mbedtls_asn1_named_data</a>
              </li>
      
            </ul>
            
          </li>
          <li>
            <a href="#consts" class="nav-label">Consts</a>
            
            <ul class="nav-sub-list">
            
            </ul>
            
          </li>
          <li>
            <a href="#types" class="nav-label">Types</a>
            
            <ul class="nav-sub-list">
            
            </ul>
            
          </li>
          <li>
            <a href="#typedefs" class="nav-label">Typedefs</a>
             
            <ul class="nav-sub-list">

              <li>
                <a href="#
mbedtls_asn1_buf;
" class="nav-sub-label">
mbedtls_asn1_buf;
</a>
              </li>
      

              <li>
                <a href="#
mbedtls_asn1_bitstring;
" class="nav-sub-label">
mbedtls_asn1_bitstring;
</a>
              </li>
      

              <li>
                <a href="#
mbedtls_asn1_sequence;
" class="nav-sub-label">
mbedtls_asn1_sequence;
</a>
              </li>
      

              <li>
                <a href="#
mbedtls_asn1_named_data;
" class="nav-sub-label">
mbedtls_asn1_named_data;
</a>
              </li>
      
            </ul>
            
          </li>
        </ul>
      </nav>
    </div>
    <div class="doc-content">
      <h2 id="Documentation" class="doc-title">Documentation</h2>
      <h3 id="includes">Includes</h3>
      

      <h4 id="config.h"><span>config.h</span></h4>
      <pre class="doc-declare"><code>#include "config.h"
</code></pre>
      <pre class="doc-comment">#include "config.h"
</pre>

      <h4 id="MBEDTLS_CONFIG_FILE"><span>MBEDTLS_CONFIG_FILE</span></h4>
      <pre class="doc-declare"><code>#include MBEDTLS_CONFIG_FILE
</code></pre>
      <pre class="doc-comment">#include MBEDTLS_CONFIG_FILE
</pre>

      <h4 id="stddef.h"><span>stddef.h</span></h4>
      <pre class="doc-declare"><code>#include &lt;stddef.h&gt;
</code></pre>
      <pre class="doc-comment">#include <stddef.h>
</pre>

      <h4 id="bignum.h"><span>bignum.h</span></h4>
      <pre class="doc-declare"><code>#include "bignum.h"
</code></pre>
      <pre class="doc-comment">#include "bignum.h"
</pre>
      <h3 id="macros">Macros</h3>
      

      <h4 id="MBEDTLS_ASN1_H">Marco <span>MBEDTLS_ASN1_H</span></h4>
      <pre class="doc-declare"><code>#define MBEDTLS_ASN1_H
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MBEDTLS_ERR_ASN1_OUT_OF_DATA">Marco <span>MBEDTLS_ERR_ASN1_OUT_OF_DATA</span></h4>
      <pre class="doc-declare"><code>#define MBEDTLS_ERR_ASN1_OUT_OF_DATA                     -96 /**< Out of data when parsing an ASN1 data structure. */
</code></pre>
      <pre class="doc-comment">/**
 * \name ASN1 Error codes
 * These error codes are OR'ed to X509 error codes for
 * higher error granularity.
 * ASN1 is a standard to specify data structures.
 * \{
 */</pre>

      <h4 id="MBEDTLS_ERR_ASN1_UNEXPECTED_TAG">Marco <span>MBEDTLS_ERR_ASN1_UNEXPECTED_TAG</span></h4>
      <pre class="doc-declare"><code>#define MBEDTLS_ERR_ASN1_UNEXPECTED_TAG                  -98 /**< ASN1 tag was of an unexpected value. */
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MBEDTLS_ERR_ASN1_INVALID_LENGTH">Marco <span>MBEDTLS_ERR_ASN1_INVALID_LENGTH</span></h4>
      <pre class="doc-declare"><code>#define MBEDTLS_ERR_ASN1_INVALID_LENGTH                  -100 /**< Error when trying to determine the length or invalid length. */
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MBEDTLS_ERR_ASN1_LENGTH_MISMATCH">Marco <span>MBEDTLS_ERR_ASN1_LENGTH_MISMATCH</span></h4>
      <pre class="doc-declare"><code>#define MBEDTLS_ERR_ASN1_LENGTH_MISMATCH                 -102 /**< Actual length differs from expected length. */
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MBEDTLS_ERR_ASN1_INVALID_DATA">Marco <span>MBEDTLS_ERR_ASN1_INVALID_DATA</span></h4>
      <pre class="doc-declare"><code>#define MBEDTLS_ERR_ASN1_INVALID_DATA                    -104 /**< Data is invalid. (not used) */
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MBEDTLS_ERR_ASN1_ALLOC_FAILED">Marco <span>MBEDTLS_ERR_ASN1_ALLOC_FAILED</span></h4>
      <pre class="doc-declare"><code>#define MBEDTLS_ERR_ASN1_ALLOC_FAILED                    -6A /**< Memory allocation failed */
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MBEDTLS_ERR_ASN1_BUF_TOO_SMALL">Marco <span>MBEDTLS_ERR_ASN1_BUF_TOO_SMALL</span></h4>
      <pre class="doc-declare"><code>#define MBEDTLS_ERR_ASN1_BUF_TOO_SMALL                   -6C /**< Buffer too small when writing ASN.1 data structure. */
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MBEDTLS_ASN1_BOOLEAN">Marco <span>MBEDTLS_ASN1_BOOLEAN</span></h4>
      <pre class="doc-declare"><code>#define MBEDTLS_ASN1_BOOLEAN                1
</code></pre>
      <pre class="doc-comment">/**
 * \name DER constants
 * These constants comply with the DER encoded ASN.1 type tags.
 * DER encoding uses hexadecimal representation.
 * An example DER sequence is:\n
 * - 0x02 -- tag indicating INTEGER
 * - 0x01 -- length in octets
 * - 0x05 -- value
 * Such sequences are typically read into \c ::mbedtls_x509_buf.
 * \{
 */</pre>

      <h4 id="MBEDTLS_ASN1_INTEGER">Marco <span>MBEDTLS_ASN1_INTEGER</span></h4>
      <pre class="doc-declare"><code>#define MBEDTLS_ASN1_INTEGER                2
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MBEDTLS_ASN1_BIT_STRING">Marco <span>MBEDTLS_ASN1_BIT_STRING</span></h4>
      <pre class="doc-declare"><code>#define MBEDTLS_ASN1_BIT_STRING             3
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MBEDTLS_ASN1_OCTET_STRING">Marco <span>MBEDTLS_ASN1_OCTET_STRING</span></h4>
      <pre class="doc-declare"><code>#define MBEDTLS_ASN1_OCTET_STRING           4
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MBEDTLS_ASN1_NULL">Marco <span>MBEDTLS_ASN1_NULL</span></h4>
      <pre class="doc-declare"><code>#define MBEDTLS_ASN1_NULL                   5
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MBEDTLS_ASN1_OID">Marco <span>MBEDTLS_ASN1_OID</span></h4>
      <pre class="doc-declare"><code>#define MBEDTLS_ASN1_OID                    6
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MBEDTLS_ASN1_UTF8_STRING">Marco <span>MBEDTLS_ASN1_UTF8_STRING</span></h4>
      <pre class="doc-declare"><code>#define MBEDTLS_ASN1_UTF8_STRING            0C
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MBEDTLS_ASN1_SEQUENCE">Marco <span>MBEDTLS_ASN1_SEQUENCE</span></h4>
      <pre class="doc-declare"><code>#define MBEDTLS_ASN1_SEQUENCE               16
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MBEDTLS_ASN1_SET">Marco <span>MBEDTLS_ASN1_SET</span></h4>
      <pre class="doc-declare"><code>#define MBEDTLS_ASN1_SET                    17
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MBEDTLS_ASN1_PRINTABLE_STRING">Marco <span>MBEDTLS_ASN1_PRINTABLE_STRING</span></h4>
      <pre class="doc-declare"><code>#define MBEDTLS_ASN1_PRINTABLE_STRING       19
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MBEDTLS_ASN1_T61_STRING">Marco <span>MBEDTLS_ASN1_T61_STRING</span></h4>
      <pre class="doc-declare"><code>#define MBEDTLS_ASN1_T61_STRING             20
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MBEDTLS_ASN1_IA5_STRING">Marco <span>MBEDTLS_ASN1_IA5_STRING</span></h4>
      <pre class="doc-declare"><code>#define MBEDTLS_ASN1_IA5_STRING             22
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MBEDTLS_ASN1_UTC_TIME">Marco <span>MBEDTLS_ASN1_UTC_TIME</span></h4>
      <pre class="doc-declare"><code>#define MBEDTLS_ASN1_UTC_TIME               23
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MBEDTLS_ASN1_GENERALIZED_TIME">Marco <span>MBEDTLS_ASN1_GENERALIZED_TIME</span></h4>
      <pre class="doc-declare"><code>#define MBEDTLS_ASN1_GENERALIZED_TIME       24
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MBEDTLS_ASN1_UNIVERSAL_STRING">Marco <span>MBEDTLS_ASN1_UNIVERSAL_STRING</span></h4>
      <pre class="doc-declare"><code>#define MBEDTLS_ASN1_UNIVERSAL_STRING       1C
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MBEDTLS_ASN1_BMP_STRING">Marco <span>MBEDTLS_ASN1_BMP_STRING</span></h4>
      <pre class="doc-declare"><code>#define MBEDTLS_ASN1_BMP_STRING             1E
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MBEDTLS_ASN1_PRIMITIVE">Marco <span>MBEDTLS_ASN1_PRIMITIVE</span></h4>
      <pre class="doc-declare"><code>#define MBEDTLS_ASN1_PRIMITIVE              0
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MBEDTLS_ASN1_CONSTRUCTED">Marco <span>MBEDTLS_ASN1_CONSTRUCTED</span></h4>
      <pre class="doc-declare"><code>#define MBEDTLS_ASN1_CONSTRUCTED            32
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MBEDTLS_ASN1_CONTEXT_SPECIFIC">Marco <span>MBEDTLS_ASN1_CONTEXT_SPECIFIC</span></h4>
      <pre class="doc-declare"><code>#define MBEDTLS_ASN1_CONTEXT_SPECIFIC       128
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MBEDTLS_ASN1_TAG_CLASS_MASK">Marco <span>MBEDTLS_ASN1_TAG_CLASS_MASK</span></h4>
      <pre class="doc-declare"><code>#define MBEDTLS_ASN1_TAG_CLASS_MASK         0xC0
</code></pre>
      <pre class="doc-comment">/*
 * Bit masks for each of the components of an ASN.1 tag as specified in
 * ITU X.690 (08/2015), section 8.1 "General rules for encoding",
 * paragraph 8.1.2.2:
 *
 * Bit  8     7   6   5          1
 *     +-------+-----+------------+
 *     | Class | P/C | Tag number |
 *     +-------+-----+------------+
 */</pre>

      <h4 id="MBEDTLS_ASN1_TAG_PC_MASK">Marco <span>MBEDTLS_ASN1_TAG_PC_MASK</span></h4>
      <pre class="doc-declare"><code>#define MBEDTLS_ASN1_TAG_PC_MASK            32
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MBEDTLS_ASN1_TAG_VALUE_MASK">Marco <span>MBEDTLS_ASN1_TAG_VALUE_MASK</span></h4>
      <pre class="doc-declare"><code>#define MBEDTLS_ASN1_TAG_VALUE_MASK         31
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MBEDTLS_OID_SIZE(x)">Marco <span>MBEDTLS_OID_SIZE(x)</span></h4>
      <pre class="doc-declare"><code>#define MBEDTLS_OID_SIZE(x) (sizeof(x) - 1)
</code></pre>
      <pre class="doc-comment">/** Returns the size of the binary string, without the trailing \\0 */</pre>

      <h4 id="MBEDTLS_OID_CMP(oid_str, oid_buf)">Marco <span>MBEDTLS_OID_CMP(oid_str, oid_buf)</span></h4>
      <pre class="doc-declare"><code>#define MBEDTLS_OID_CMP(oid_str, oid_buf)                                  \
       ( ( MBEDTLS_OID_SIZE(oid_str) != (oid_buf)->len ) ||               \
         memcmp( (oid_str), (oid_buf)->p, (oid_buf)->len) != 0 )
</code></pre>
      <pre class="doc-comment">/**
 * Compares an mbedtls_asn1_buf structure to a reference OID.
 *
 * Only works for 'defined' oid_str values (MBEDTLS_OID_HMAC_SHA1), you cannot use a
 * 'unsigned char *oid' here!
 */</pre>
      <h3 id="functions">Functions</h3>
      

      <h4 id="mbedtls_asn1_get_len">Func <span>mbedtls_asn1_get_len</span></h4>
      <pre class="doc-declare"><code>int mbedtls_asn1_get_len( unsigned char **p,
                 const unsigned char *end,
                 size_t *len );</code></pre>
      <pre class="doc-comment">/**
 * \brief       Get the length of an ASN.1 element.
 *              Updates the pointer to immediately behind the length.
 *
 * \param p     The position in the ASN.1 data
 * \param end   End of data
 * \param len   The variable that will receive the value
 *
 * \return      0 if successful, MBEDTLS_ERR_ASN1_OUT_OF_DATA on reaching
 *              end of data, MBEDTLS_ERR_ASN1_INVALID_LENGTH if length is
 *              unparseable.
 */</pre>

      <h4 id="mbedtls_asn1_get_tag">Func <span>mbedtls_asn1_get_tag</span></h4>
      <pre class="doc-declare"><code>int mbedtls_asn1_get_tag( unsigned char **p,
                 const unsigned char *end,
                 size_t *len, int tag );</code></pre>
      <pre class="doc-comment">/**
 * \brief       Get the tag and length of the tag. Check for the requested tag.
 *              Updates the pointer to immediately behind the tag and length.
 *
 * \param p     The position in the ASN.1 data
 * \param end   End of data
 * \param len   The variable that will receive the length
 * \param tag   The expected tag
 *
 * \return      0 if successful, MBEDTLS_ERR_ASN1_UNEXPECTED_TAG if tag did
 *              not match requested tag, or another specific ASN.1 error code.
 */</pre>

      <h4 id="mbedtls_asn1_get_bool">Func <span>mbedtls_asn1_get_bool</span></h4>
      <pre class="doc-declare"><code>int mbedtls_asn1_get_bool( unsigned char **p,
                  const unsigned char *end,
                  int *val );</code></pre>
      <pre class="doc-comment">/**
 * \brief       Retrieve a boolean ASN.1 tag and its value.
 *              Updates the pointer to immediately behind the full tag.
 *
 * \param p     The position in the ASN.1 data
 * \param end   End of data
 * \param val   The variable that will receive the value
 *
 * \return      0 if successful or a specific ASN.1 error code.
 */</pre>

      <h4 id="mbedtls_asn1_get_int">Func <span>mbedtls_asn1_get_int</span></h4>
      <pre class="doc-declare"><code>int mbedtls_asn1_get_int( unsigned char **p,
                 const unsigned char *end,
                 int *val );</code></pre>
      <pre class="doc-comment">/**
 * \brief       Retrieve an integer ASN.1 tag and its value.
 *              Updates the pointer to immediately behind the full tag.
 *
 * \param p     The position in the ASN.1 data
 * \param end   End of data
 * \param val   The variable that will receive the value
 *
 * \return      0 if successful or a specific ASN.1 error code.
 */</pre>

      <h4 id="mbedtls_asn1_get_bitstring">Func <span>mbedtls_asn1_get_bitstring</span></h4>
      <pre class="doc-declare"><code>int mbedtls_asn1_get_bitstring( unsigned char **p, const unsigned char *end,
                       mbedtls_asn1_bitstring *bs);</code></pre>
      <pre class="doc-comment">/**
 * \brief       Retrieve a bitstring ASN.1 tag and its value.
 *              Updates the pointer to immediately behind the full tag.
 *
 * \param p     The position in the ASN.1 data
 * \param end   End of data
 * \param bs    The variable that will receive the value
 *
 * \return      0 if successful or a specific ASN.1 error code.
 */</pre>

      <h4 id="mbedtls_asn1_get_bitstring_null">Func <span>mbedtls_asn1_get_bitstring_null</span></h4>
      <pre class="doc-declare"><code>int mbedtls_asn1_get_bitstring_null( unsigned char **p, const unsigned char *end,
                            size_t *len );</code></pre>
      <pre class="doc-comment">/**
 * \brief       Retrieve a bitstring ASN.1 tag without unused bits and its
 *              value.
 *              Updates the pointer to the beginning of the bit/octet string.
 *
 * \param p     The position in the ASN.1 data
 * \param end   End of data
 * \param len   Length of the actual bit/octect string in bytes
 *
 * \return      0 if successful or a specific ASN.1 error code.
 */</pre>

      <h4 id="mbedtls_asn1_get_sequence_of">Func <span>mbedtls_asn1_get_sequence_of</span></h4>
      <pre class="doc-declare"><code>int mbedtls_asn1_get_sequence_of( unsigned char **p,
                         const unsigned char *end,
                         mbedtls_asn1_sequence *cur,
                         int tag);</code></pre>
      <pre class="doc-comment">/**
 * \brief       Parses and splits an ASN.1 "SEQUENCE OF <tag>"
 *              Updated the pointer to immediately behind the full sequence tag.
 *
 * \param p     The position in the ASN.1 data
 * \param end   End of data
 * \param cur   First variable in the chain to fill
 * \param tag   Type of sequence
 *
 * \return      0 if successful or a specific ASN.1 error code.
 */</pre>

      <h4 id="mbedtls_asn1_get_mpi">Func <span>mbedtls_asn1_get_mpi</span></h4>
      <pre class="doc-declare"><code>int mbedtls_asn1_get_mpi( unsigned char **p,
                 const unsigned char *end,
                 mbedtls_mpi *X );</code></pre>
      <pre class="doc-comment">/**
 * \brief       Retrieve a MPI value from an integer ASN.1 tag.
 *              Updates the pointer to immediately behind the full tag.
 *
 * \param p     The position in the ASN.1 data
 * \param end   End of data
 * \param X     The MPI that will receive the value
 *
 * \return      0 if successful or a specific ASN.1 or MPI error code.
 */</pre>

      <h4 id="mbedtls_asn1_get_alg">Func <span>mbedtls_asn1_get_alg</span></h4>
      <pre class="doc-declare"><code>int mbedtls_asn1_get_alg( unsigned char **p,
                 const unsigned char *end,
                 mbedtls_asn1_buf *alg, mbedtls_asn1_buf *params );</code></pre>
      <pre class="doc-comment">/**
 * \brief       Retrieve an AlgorithmIdentifier ASN.1 sequence.
 *              Updates the pointer to immediately behind the full
 *              AlgorithmIdentifier.
 *
 * \param p     The position in the ASN.1 data
 * \param end   End of data
 * \param alg   The buffer to receive the OID
 * \param params The buffer to receive the params (if any)
 *
 * \return      0 if successful or a specific ASN.1 or MPI error code.
 */</pre>

      <h4 id="mbedtls_asn1_get_alg_null">Func <span>mbedtls_asn1_get_alg_null</span></h4>
      <pre class="doc-declare"><code>int mbedtls_asn1_get_alg_null( unsigned char **p,
                      const unsigned char *end,
                      mbedtls_asn1_buf *alg );</code></pre>
      <pre class="doc-comment">/**
 * \brief       Retrieve an AlgorithmIdentifier ASN.1 sequence with NULL or no
 *              params.
 *              Updates the pointer to immediately behind the full
 *              AlgorithmIdentifier.
 *
 * \param p     The position in the ASN.1 data
 * \param end   End of data
 * \param alg   The buffer to receive the OID
 *
 * \return      0 if successful or a specific ASN.1 or MPI error code.
 */</pre>

      <h4 id="mbedtls_asn1_free_named_data">Func <span>mbedtls_asn1_free_named_data</span></h4>
      <pre class="doc-declare"><code>void mbedtls_asn1_free_named_data( mbedtls_asn1_named_data *entry );</code></pre>
      <pre class="doc-comment">/**
 * \brief       Free a mbedtls_asn1_named_data entry
 *
 * \param entry The named data entry to free
 */</pre>

      <h4 id="mbedtls_asn1_free_named_data_list">Func <span>mbedtls_asn1_free_named_data_list</span></h4>
      <pre class="doc-declare"><code>void mbedtls_asn1_free_named_data_list( mbedtls_asn1_named_data **head );</code></pre>
      <pre class="doc-comment">/**
 * \brief       Free all entries in a mbedtls_asn1_named_data list
 *              Head will be set to NULL
 *
 * \param head  Pointer to the head of the list of named data entries to free
 */</pre>
      <h3 id="vars">Vars</h3>
      

      <h4 id="mbedtls_asn1_named_data">Variable <span>mbedtls_asn1_named_data</span></h4>
      <pre class="doc-declare"><code>mbedtls_asn1_named_data *mbedtls_asn1_find_named_data( mbedtls_asn1_named_data *list,
                                      const char *oid, size_t len );</code></pre>
      <pre class="doc-comment">/**
 * \brief       Find a specific named_data entry in a sequence or list based on
 *              the OID.
 *
 * \param list  The list to seek through
 * \param oid   The OID to look for
 * \param len   Size of the OID
 *
 * \return      NULL if not found, or a pointer to the existing entry.
 */</pre>
      <h3 id="consts">Consts</h3>
      
      <h3 id="types">Types</h3>
      
      <h3 id="typedefs">Typedefs</h3>
      

      <h4 id="
mbedtls_asn1_buf;
">Typedef <span>
mbedtls_asn1_buf;
</span></h4>
      <pre class="doc-declare"><code>typedef struct mbedtls_asn1_buf
{
   int tag;               /**< ASN1 type, e.g. MBEDTLS_ASN1_UTF8_STRING. */
   size_t len;            /**< ASN1 length, in octets. */
   unsigned char *p;      /**< ASN1 data, e.g. in ASCII. */
}
mbedtls_asn1_buf;
</code></pre>
      <pre class="doc-comment">/**
 * Type-length-value structure that allows for ASN1 using DER.
 */</pre>

      <h4 id="
mbedtls_asn1_bitstring;
">Typedef <span>
mbedtls_asn1_bitstring;
</span></h4>
      <pre class="doc-declare"><code>typedef struct mbedtls_asn1_bitstring
{
   size_t len;                /**< ASN1 length, in octets. */
   unsigned char unused_bits; /**< Number of unused bits at the end of the string */
   unsigned char *p;          /**< Raw ASN1 data for the bit string */
}
mbedtls_asn1_bitstring;
</code></pre>
      <pre class="doc-comment">/**
 * Container for ASN1 bit strings.
 */</pre>

      <h4 id="
mbedtls_asn1_sequence;
">Typedef <span>
mbedtls_asn1_sequence;
</span></h4>
      <pre class="doc-declare"><code>typedef struct mbedtls_asn1_sequence
{
   mbedtls_asn1_buf buf;                  /**< Buffer containing the given ASN.1 item. */
   struct mbedtls_asn1_sequence *next;   /**< The next entry in the sequence. */
}
mbedtls_asn1_sequence;
</code></pre>
      <pre class="doc-comment">/**
 * Container for a sequence of ASN.1 items
 */</pre>

      <h4 id="
mbedtls_asn1_named_data;
">Typedef <span>
mbedtls_asn1_named_data;
</span></h4>
      <pre class="doc-declare"><code>typedef struct mbedtls_asn1_named_data
{
   mbedtls_asn1_buf oid;                  /**< The object identifier. */
   mbedtls_asn1_buf val;                  /**< The named value. */
   struct mbedtls_asn1_named_data *next; /**< The next entry in the sequence. */
   unsigned char next_merged;     /**< Merge next item into the current one? */
}
mbedtls_asn1_named_data;
</code></pre>
      <pre class="doc-comment">/**
 * Container for a sequence or list of 'named' ASN.1 data items
 */</pre>
    </div>
  </body>
</html>
            